<?php
//包含数据库配置文件
include '../../public/dbconfig.php';
//包含函数库文件
include '../../public/func.inc.php';

$link = conn();
//var_dump($link);
$pid = $_POST['id'];
$pname = $_POST['pname'];
$rtime = time();
$sql = "insert into bbs_part(pname,rtime) values('{$pname}','{$rtime}')";
//var_dump($sql);

$res = mysqli_query($link,$sql);
//var_dump($res);
//exit;
if($res){
	echo '<script>alert("添加成功");window.location.href="list.php";</script>';
}else{
	echo '<script>alert("添加失败");window.location.href="add.html";</script>';
	
}
mysqli_close($link);









?>
